package com.ljtxxhwj.myblob.mapper;

import com.ljtxxhwj.myblob.entity.ArticleTag;
import com.ljtxxhwj.myblob.entity.User;
import com.ljtxxhwj.myblob.entity.UserExample;
import java.util.List;

import com.ljtxxhwj.myblob.entity.UserWithStateName;
import org.apache.ibatis.annotations.Param;
import com.ljtxxhwj.myblob.entity.UserExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface UserMapper {
    User select(User user);

    User selectUserById(Integer userId);


    // 更新用户ID
    void updateUserId(Integer userId, Integer newUserId);

    // 更新用户名
    void updateUserName(Integer userId, String newUserName);

    // 更新用户密码
    void updateUserPassword(Integer userId, String newUserPassword);

    // 更新用户头像
    void updateUserPic(Integer userId, String newUserPic);

    // 更新用户介绍
    void updateUserIntroduce(Integer userId, String newUserIntroduce);

    // 更新用户电话
    void updateUserPhone(Integer userId, String newUserPhone);

    // 更新用户邮箱
    void updateUserEmail(Integer userId, String newUserEmail);
    int updateUser(
            @Param("userId") Integer userId,
            @Param("userName") String userName,
            @Param("userIntroduce") String userIntroduce,
            @Param("userEmail") String userEmail,
            @Param("userPhone") String userPhone,
            @Param("userPassword") String userPassword);
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table user
     *
     * @mbg.generated Sat Jul 20 21:04:29 CST 2024
     */
    long countByExample(UserExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table user
     *
     * @mbg.generated Sat Jul 20 21:04:29 CST 2024
     */
    int deleteByExample(UserExample example);

    int deleteByPrimaryKey(Integer userId);

    int closeBatch(Integer id);

    int deleteBatch(Integer id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table user
     *
     * @mbg.generated Sat Jul 20 21:04:29 CST 2024
     */
    int insert(User row);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table user
     *
     * @mbg.generated Sat Jul 20 21:04:29 CST 2024
     */
    int insertSelective(User row);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table user
     *
     * @mbg.generated Sat Jul 20 21:04:29 CST 2024
     */
    List<UserWithStateName> selectByExample(UserExample example);

    User selectByPrimaryKey(Integer userId);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table user
     *
     * @mbg.generated Sat Jul 20 21:04:29 CST 2024
     */
    int updateByExampleSelective(@Param("row") User row, @Param("example") UserExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table user
     *
     * @mbg.generated Sat Jul 20 21:04:29 CST 2024
     */
    int updateByExample(@Param("row") User row, @Param("example") UserExample example);

    List<UserWithStateName> loadWithPage();

    void deleteById(Integer userId);

    void closeById(Integer userId);

    void backById(Integer userId);
}